/*
*
* PlotObject
*
* This class is meant to be a superclass for any objects that get plotted
*
*/
class PlotObject {
  
  // ----------------------------------------
  // attributes
  // ----------------------------------------
  boolean visible = true;
  
  // ----------------------------------------
  // convUTMToScreen  
  // method for converting UTM coordinates to screen space
  // ----------------------------------------
  PVector convUTMToScreen(PVector utmCoords) {
    
    PVector out = new PVector();
    
    out.x = width * (utmCoords.x - localOrigin.x) / localWidth;
    out.y = height * ( 1 - ((utmCoords.y - localOrigin.y) / localHeight));
    
    return out;
    
  } // convScreenToUTM
  
  // ----------------------------------------
  // convScreenToUTM
  // method for converting screen coordinates to UTM coordinates
  // ----------------------------------------
  PVector convScreenToUTM(PVector screenCoords) {
    
    PVector out = new PVector();
    
    out.x = screenCoords.x * localWidth / width + localOrigin.x;
    out.y = (1 - (screenCoords.y / height)) * localHeight - localOrigin.y;
    
    return out;
    
  } // convScreenToUTM
    
} // class
